<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    function aaa() {
        for (var i = 0; i < 100 ; i++) {
            console.log(i)
        }
        console.log(i+1)    //问题？ i出了这个作用域还可以使用
    }

    function bbb() {
        for (let i = 0; i < 100; i++) {
            console.log(i)
        }
        console.log(i+1)    //报错 i未定义
    }



</script>


</body>
</html>